package com.sun.service.impl;

import com.sun.entity.Fine;
import com.sun.entity.FineUtil;
import com.sun.mapper.FineMapper;
import com.sun.service.FineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author SunRui
 * @description TODO
 * @date 2024/8/10 22:27
 */
@Service
public class FineServiceImpl implements FineService {
    @Autowired
    private FineMapper fineMapper;
    @Override
    public int addFine(Fine fine) {
        return fineMapper.addFine(fine);
    }

    @Override
    public int updateStaus(int id) {
        return fineMapper.updateStaus(id);
    }

    @Override
    public List<FineUtil> getFineList(int page, int readerId) {
        return fineMapper.getFineList(page,readerId);
    }

    @Override
    public int selectBookIsFine(int bookId, int readerId) {
        return fineMapper.selectBookIsFine(bookId,readerId);
    }

    @Override
    public int getAllPage(int readerId) {
        return fineMapper.getAllPage(readerId);
    }
}
